<?php

namespace App\Http\Resources;



use App\Http\Responses\Resource;
use App\Http\Resources\Book as BookCollection;
use App\Http\Resources\BookCollection as BookCollectionResource;

class BookList extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request
     * @return array
     */
    public function toArray($request)
    {

        return [
            'id' => $this->id,
            'remark' => $this->remark,
            'book' => new BookCollection($this->book),
            'book_collection' => new BookCollectionResource($this->bookCollection)
        ];

    }
}
